/**
 * Copyright (c) 2006 Amgad S Youssef
 * All Rights Reserved.
 * Licensed under the Eclipse Public License - v 1.0
 * For more information see http://www.eclipse.org/legal/epl-v10.html
 */
package org.eclipsejcde.core;

import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;

/**
 * @author Amgad S Youssef
 *
 */
public class CheckerStatus extends MultiStatus implements ICheckerStatus {
	private int charStart = -1;

	private int charEnd = -1;

	private IResource resource;

	public CheckerStatus() {
		super(Activator.PLUGIN_ID, IStatus.OK, "", null);
	}

	public CheckerStatus(int severity, String message) {
		super(Activator.PLUGIN_ID, IStatus.OK, message, null);
		setSeverity(severity);
	}

	public CheckerStatus(int severity, String message, IResource resource) {
		super(Activator.PLUGIN_ID, IStatus.OK, message, null);
		setSeverity(severity);
		this.resource = resource;
	}

	public CheckerStatus(int severity, String message, int charStart, int charEnd) {
		super(Activator.PLUGIN_ID, IStatus.OK, message, null);
		setSeverity(severity);
		this.charStart = charStart;
		this.charEnd = charEnd;
	}

	public CheckerStatus(int severity, String message, int charStart, int charEnd, IResource resource) {
		super(Activator.PLUGIN_ID, IStatus.OK, message, null);
		setSeverity(severity);
		this.charStart = charStart;
		this.charEnd = charEnd;
		this.resource = resource;
	}

	@Override
	public int getCharEnd() {
		return charEnd;
	}

	@Override
	public int getCharStart() {
		return charStart;
	}

	@Override
	public IResource getResource() {
		return resource;
	}

}
